﻿using System.Web;
using System.Web.Optimization;

namespace UI
{
    public class BundleConfig
    {
        // 有关绑定的详细信息，请访问 http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            BundleTable.EnableOptimizations = false;//绑定 缓存 这个可能会有错
            //Script
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.validate*"));

            // 使用要用于开发和学习的 Modernizr 的开发版本。然后，当你做好
            // 生产准备时，请使用 http://modernizr.com 上的生成工具来仅选择所需的测试。
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js",
                      "~/Scripts/respond.js"));

            //style  不能带问号参数
            bundles.Add(new StyleBundle("~/css/admin").Include(
                      "~/css/bootstrap.min.css",
                      "~/css/font-awesome.css",
                      "~/css/plugins/bootstrap-table/bootstrap-table.min.css",
                      "~/css/animate.css",
                      "~/css/style.css",
                      "~/css/plugins/chosen/chosen.css"
                      ));

            bundles.Add(new ScriptBundle("~/js/admin").Include(
                      "~/js/jquery.min.js",
                      "~/js/bootstrap.min.js",
                      "~/js/plugins/layer/layer.min.js",
                      "~/js/plugins/bootstrap-table/bootstrap-table.min.js",
                      "~/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js",
                      "~/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js",
                      "~/Scripts/jquery.easyui.min.js",
                      "~/js/plugins/chosen/chosen.jquery.js"
                      ));
        }
    }
}
